<template>
  <div >
    <van-nav-bar
    title="标题1"
    left-text="返回"
    left-arrow
  />
    <van-button type="success" @click="test">主要按钮</van-button>
  </div>
</template>

<script setup>
import { useAttrs } from 'vue';
import { useRoute, useRouter } from 'vue-router';

const attrs = useAttrs();
// attrs.onShowNav(false);
function test() {
  console.log(attrs)
  // attrs.onShowNav(false);
}
// 使用toRefs解构
// let { } = { ...toRefs(data) } 
// defineExpose({
//   ...toRefs(data)
// })

</script>
<style scoped lang='scss'>
</style>